package com.minglead.springboot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.ImportResource;

@SpringBootApplication(scanBasePackages={"com.minglead"})
@ServletComponentScan
//SpringBootServletInitializer
public class SpringbootApplication extends SpringBootServletInitializer{
	   
	public static void main(String[] args) {
		SpringApplication.run(SpringbootApplication.class, args);
	}
	
	// 为了打包springboot项目
	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
		this.setRegisterErrorPageFilter(false); // 错误页面有容器来处理，而不是SpringBoot
/*		builder.properties(PropertiesUtils.getInstance().getProperties());*/
		return builder.sources(SpringbootApplication.class);
	}

	 
}
